package com.qf.controller;

import com.qf.entity.Users;
import com.qf.service.UsersService;
import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.RequestMapping;

import javax.annotation.Resource;
import java.util.List;

/**
 * 2019/10/8
 * Administrator
 * sss1008
 * 面向对象面向君  不负代码不负卿
 */
@Controller
public class UsersController {
    @Resource
    private UsersService usersService;

    @RequestMapping("/findall")
    public String getall(ModelMap map){
        List<Users> usersList = usersService.findall();
        map.addAttribute("ulist",usersList);
        return "show";//默认转发方式跳转页面
    }
}
